/**
 * button带权限控制
 */
Ext.define('MyApp.view.ux.BaseAuthorityButton', {
			extend : 'Ext.button.Button',
			alias : 'widget.baseauthoritybutton',
			authorityid:'',
			initComponent : function() {
				this.listeners={
					beforerender:function(btn){
						var me=this,authorities = Ext.user.get('authorities'),index=-1;
						Ext.Array.each(authorities ,function(item, ind, countriesItSelf) {//1a86328e-4258-4947-85c9-bd2f797409ca
							if(item.id==me.authorityid){
								index=ind;
							}
						});
						if(index==-1){
							//me.setVisible( false ) ;
							return false;
						}
						return true;
					}
				},
				this.callParent(arguments);
			}
		});